<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>RobotPlc: PlcMainLogic库接口文档</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">RobotPlc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">PlcMainLogic库接口文档 </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="autotoc_md1"></a>
一、简介</h1>
<p>本文档由 Doxygen 自动生成，罗列了各个接口函数。</p>
<h1><a class="anchor" id="autotoc_md2"></a>
二、指令流数据结构体</h1>
<div class="fragment"><div class="line"> {c++}</div>
<div class="line">//指令描述</div>
<div class="line">typedef struct</div>
<div class="line">{</div>
<div class="line">    unsigned short cmd;             //命令编号</div>
<div class="line">    unsigned short para1;           //参数</div>
<div class="line">    unsigned short para2;</div>
<div class="line">    unsigned short para3;</div>
<div class="line">    unsigned short para4;</div>
<div class="line">    unsigned short rev[5];</div>
<div class="line">    char message[129];              //</div>
<div class="line">}CommandDetail;</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md3"></a>
三、指令流命令简介</h1>
<p>如下表格所示</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">命令 </th><th class="markdownTableHeadNone">cmd </th><th class="markdownTableHeadNone">para1 </th><th class="markdownTableHeadNone">para2 </th><th class="markdownTableHeadNone">para3 </th><th class="markdownTableHeadNone">para4  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">上使能Y1 </td><td class="markdownTableBodyNone">1 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">下使能Y0 </td><td class="markdownTableBodyNone">2 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">清除报警Y2 </td><td class="markdownTableBodyNone">3 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">启动Z1 </td><td class="markdownTableBodyNone">11 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">暂停Z2 </td><td class="markdownTableBodyNone">12 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">停止Z3 </td><td class="markdownTableBodyNone">13 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone">写IO指令  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">写X变量脉冲指令 </td><td class="markdownTableBodyNone">22 </td><td class="markdownTableBodyNone">模块号 </td><td class="markdownTableBodyNone">点位号 0~15 </td><td class="markdownTableBodyNone">写入值 </td><td class="markdownTableBodyNone">持续时间（毫秒）  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">写Y变量脉冲指令 </td><td class="markdownTableBodyNone">23 </td><td class="markdownTableBodyNone">模块号 </td><td class="markdownTableBodyNone">点位号 0~15 </td><td class="markdownTableBodyNone">写入值 </td><td class="markdownTableBodyNone">持续时间（毫秒）  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">写G变量脉冲指令 </td><td class="markdownTableBodyNone">24 </td><td class="markdownTableBodyNone">模块号 </td><td class="markdownTableBodyNone">点位号 0~15 </td><td class="markdownTableBodyNone">写入值 </td><td class="markdownTableBodyNone">持续时间（毫秒）  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">设定坐标系 </td><td class="markdownTableBodyNone">31 </td><td class="markdownTableBodyNone">坐标系 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">修改坐标系工具号 </td><td class="markdownTableBodyNone">32 </td><td class="markdownTableBodyNone">工具号 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">修改坐标系工件号 </td><td class="markdownTableBodyNone">33 </td><td class="markdownTableBodyNone">工件号 </td><td class="markdownTableBodyNone">组号(0~1) </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">远程TCP接管控制开启 </td><td class="markdownTableBodyNone">41 </td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td><td class="markdownTableBodyNone"></td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">远程TCP运动控制数据 </td><td class="markdownTableBodyNone">42 </td><td class="markdownTableBodyNone">控制字 </td><td class="markdownTableBodyNone">正向运动 </td><td class="markdownTableBodyNone">负向运动 </td><td class="markdownTableBodyNone">试教速度（实际需要除10）  </td></tr>
</table>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
